/**
 * Version 17 mrt 2008 - initial version
 */
package audioreaper;

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import audioreaper.core.ReaperSystem;
import audioreaper.ui.ReaperWindow;


/**
 * <code>ReaperApp</code> is a main loader, which will initialize reaper.
 *
 * @author <a href="mailto:vincent@nazarene.nl">Vincent van Beveren</a>
 *
 */
public class ReaperApp {

	private ReaperWindow _window;
	private ReaperSystem _system;
	
	
	public static void main(String[] args) {
		ReaperApp app = new ReaperApp();
		app.initGUI();
		app.initSystem();

		app.start();
	}

	private void initSystem() {
		_system = new ReaperSystem();
	}
	
	private void initGUI() {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}
		_window = new ReaperWindow();
	}
	
	/**
	 * @return the system
	 */
	public ReaperSystem getSystem() {
		return _system;
	}
	
	/**
	 * @return the window
	 */
	public ReaperWindow getWindow() {
		return _window;
	}
	
	private void start() {
		_window.setVisible(true);
	}
	
}
